package com.hxzy.common.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CommonDateUtil {

    //性别
    public static List<Map<String,Object>> genderData(){
        List<Map<String,Object>> list=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("label","男");
        map1.put("value","1");

        Map<String,Object> map2=new HashMap<>();
        map2.put("label","女");
        map2.put("value","0");

        list.add(map1);
        list.add(map2);
        return list;
    }


    //状态
    public static List<Map<String,Object>> statusData(){
        List<Map<String,Object>> list=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("label","正常");
        map1.put("value","0");

        Map<String,Object> map2=new HashMap<>();
        map2.put("label","停用");
        map2.put("value","1");

        list.add(map1);
        list.add(map2);
        return list;
    }
    //
    public static List<Map<String,Object>> sortData(){
        List<Map<String,Object>> list=new ArrayList<>();
        Map<String,Object> map1=new HashMap<>();
        map1.put("label","升序");
        map1.put("value","asc");

        Map<String,Object> map2=new HashMap<>();
        map2.put("label","降序");
        map2.put("value","desc");

        list.add(map1);
        list.add(map2);
        return list;
    }


    //上面两个组装
    public static Map<String,Object> commonData(){
        Map<String,Object> map=new HashMap<>();
        map.put("gender",genderData());
        map.put("status",statusData());
        map.put("sort",sortData());
        return map;
    }
}
